package quartz.quartzdemo.task;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

import java.text.SimpleDateFormat;
import java.util.Date;

public class JobExe extends QuartzJobBean {
    @Override
    protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
      //  System.out.println("feafe111");
        Object key = context.getMergedJobDataMap().get("key");
      //  System.out.println("afef=="+key);
        Object params = context.getMergedJobDataMap().get("params");
       // System.out.println("FAF--"+params);

        Date d = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
       // System.out.println("当前时间：" + sdf.format(d));
        System.out.println("aaaa-"+key+" bbbb-"+params+" 当前时间：" + sdf.format(d));
    }
}
